#ifndef MAMBA_SERVICE_ASPECT_HTTP_WRITER_ASPECT_HPP
#define MAMBA_SERVICE_ASPECT_HTTP_WRITER_ASPECT_HPP

#include <fas/aop/aspect.hpp>
#include <fas/misc/http/writer/body_writer.hpp>
#include <fas/misc/http/writer/server_header_writer.hpp>

namespace fasys{

namespace ap = ::fas::pattern;
namespace aa = ::fas::aop;
namespace ahw = ::fas::http::writer;


typedef ap::type_list_n<
  // Заголовки которые будут задействованы во всех comet-серверах 
  // ( По умолчанию используется только ContentLength )
>::type http_header_writer_advice_list;

typedef ap::type_list_n<
  // Сюда пока ничего не надо добавлять (по умолчанию используется ad_content_reader )
>::type http_body_writer_advice_list;

typedef aa::aspect< http_header_writer_advice_list > http_header_writer_aspect;
typedef aa::aspect< http_body_writer_advice_list > http_body_writer_aspect;

template<typename A = aa::aspect<> >
struct header_writer
  : ahw::server_header_writer< typename aa::aspect_merge< http_header_writer_aspect, A>::type >
{
};

template<typename A = aa::aspect<> >
struct body_writer
  : ahw::body_writer< typename aa::aspect_merge<http_body_writer_aspect, A>::type >
{
};

}

#endif
